// 统一请求路径前缀在libs/axios.js中修改
import { getRequest, postRequest, putRequest, getNoAuthRequest, postNoAuthRequest } from '@/libs/axios';
// 获取全部菜单项
export const getAllPermission = () => {
  return postRequest('/permission/all')
}
// 分页获取角色列表
export const getAllRoles = (params) => {
  return postRequest('/role/getAllList', params)
}
// 获取用户对应的菜单权限
export const getUserPermission = (params) => {
  return postRequest('/permission/user', params)
}
// 获取用户对应的菜单权限ids
export const getRolePermissionIds = (params) => {
  return postRequest('/permission/roleIds', params)
}
// 更新角色信息
export const updateRole = (params) => {
  return postRequest('/role/update', params)
}
// 新增角色
export const insertRole = (params) => {
  return postRequest('/role/insert', params)
}
// 根据role_id更新role_permission表
export const updateRolePermissionByRoleId = (params) => {
  return postRequest('/rolePermission/updateByRoleId', params)
}

export const setPermissions = (params) => {
  return postRequest('/rolePermission/setPermissions', params)
}

export const insertPermisssion = (params) => {
  return postRequest('/rolePermission/insert', params)
}


